
import 'gis_person_type_info.dart';

class GisPersonTypeRes {
    List<GisPersonTypeInfo> data;
    int code;
    int length;

    GisPersonTypeRes({this.data, this.code, this.length});

    factory GisPersonTypeRes.fromJson(Map<String, dynamic> json) {
        return GisPersonTypeRes(
            data: json['data'] != null ? (json['data'] as List).map((i) => GisPersonTypeInfo.fromJson(i)).toList() : null,
            code: json['code'], 
            length: json['length'], 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['code'] = this.code;
        data['length'] = this.length;
        if (this.data != null) {
            data['data'] = this.data.map((v) => v.toJson()).toList();
        }
        return data;
    }
}